package Beans;

import java.sql.Timestamp;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "boxstatus")
public class Box {

	private int boxId;
	private int terminalId;
	private int boxType;
	private int boxStatus;
	private int boxNum;
	private int forceOpen;
	private int isDelete;
	private int parcelID;
	private int goodsID;
	private Timestamp effectTime;
	public String boxTypeName;

	@GenericGenerator(name = "generator", strategy = "native")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "boxStatus_id", unique = true, nullable = false)
	public int getBoxId() {
		return boxId;
	}

	public void setBoxId(int boxId) {
		this.boxId = boxId;
	}

	@Column(name = "boxStatus_terminalID")
	public int getTerminalId() {
		return terminalId;
	}

	public void setTerminalId(int terminalId) {
		this.terminalId = terminalId;
	}

	@Column(name = "boxStatus_boxTypeID")
	public int getBoxType() {
		return boxType;
	}

	public void setBoxType(int boxType) {
		this.boxType = boxType;
		if (boxType == 4) {
			this.boxTypeName = "小";
		} else if (boxType == 3) {
			this.boxTypeName = "中";
		} else if (boxType == 2) {
			this.boxTypeName = "大";
		} else if (boxType == 1) {
			this.boxTypeName = "超大";
		} else {
			this.boxTypeName = "=_=";
		}

	}

	@Column(name = "boxStatus_status")
	public int getBoxStatus() {
		return boxStatus;
	}

	public void setBoxStatus(int boxStatus) {
		this.boxStatus = boxStatus;
	}

	@Column(name = "boxStatus_boxNum")
	public int getBoxNum() {
		return boxNum;
	}

	public void setBoxNum(int boxNum) {
		this.boxNum = boxNum;
	}

	@Column(name = "boxStatus_forceOpen")
	public int getForceOpen() {
		return forceOpen;
	}

	public void setForceOpen(int forceOpen) {
		this.forceOpen = forceOpen;
	}

	@Column(name = "boxStatus_isdelete")
	public int getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(int isDelete) {
		this.isDelete = isDelete;
	}

	@Column(name = "boxStatus_parcelID")
	public int getParcelID() {
		return parcelID;
	}

	public void setParcelID(int parcelID) {
		this.parcelID = parcelID;
	}

	@Column(name = "boxStatus_goodsID")
	public int getGoodsID() {
		return goodsID;
	}

	public void setGoodsID(int goodsID) {
		this.goodsID = goodsID;
	}

	@Column(name = "boxStatus_effectTime")
	public Timestamp getEffectTime() {
		return effectTime;
	}

	public void setEffectTime(Timestamp effectTime) {
		this.effectTime = effectTime;
	}

	public void print() {
		System.out.println("boxNum:" + boxNum);
	}

}
